<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">
<%@ taglib prefix="ef" uri="control"%>
<ef:init method="Evaluator.init">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>评估人员</title>
	<link rel="shortcut icon" href="${res}favicon.ico" type="image/x-icon" />
	<!--Basic Styles-->
	<link href="${ctx}framework/css/font.css" rel="stylesheet" />
	<link href="${ctx}framework/miniui/themes/material/miniui.css" rel="stylesheet" />
	<link href="${ctx}framework/css/app.min.1.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}framework/css/app.min.2.css" rel="stylesheet" type="text/css" />
	<script src="${ctx}framework/main.js" type="text/javascript"></script>
	<style type="text/css">
		html,body {
			margin: 0; padding: 0; border: 0; width: 100%; height: 100%;
		}
		.input-group-addon{width:100px;text-align:right;}
	</style>
	<script>
		var mProvice = '${MProvince}', mCity = '${MCity}', mCounty = '${MCounty}';
		$(function(){
			Server.sendRequest("CodeSourceExecutor.fetch", {CodeType:'District',ConditionField:'TreeLevel',ConditionValue:'1'},function(response){
				mini.get('MProvince').setData(response.data);
				mini.get('MProvince').setValue(mProvice);
			});
			if(mProvice){
				var e = {value:mProvice, initFlag:true};
				onProvinceChanged(e);
			}
			if(mCity){
				var e = {value:mCity, initFlag:true};
				onCityChanged(e);
			}
			
			vEmplayWay();
		});
	
		function onProvinceChanged(e) {
			Server.sendRequest("CodeSourceExecutor.fetch", {CodeType:'District',ConditionField:'1',ConditionValue:'1',ParentCode:e.value},function(response){
				mini.get('MCity').setData(response.data);
				if (!e.initFlag) {
					mini.get('MCounty').setValue("");
				} else {
					mini.get('MCity').setValue(mCity);
				}
			});
		}
		
		function onCityChanged(e) {
			Server.sendRequest("CodeSourceExecutor.fetch", {CodeType:'District',ConditionField:'TreeLevel',ConditionValue:'3',ParentCode:e.value},function(response){
				mini.get('MCounty').setData(response.data);
				if (e.initFlag) {
					mini.get('MCounty').setValue(mCounty);
				} 
			});
		}

		function vEmplayWay() {
			var employWay = mini.get("EmployWay").getValue();
			if (employWay == "UnitJudge") {
				mini.get("EmpCertCode").setAllowInput(false);
				mini.get("EmpCertCode").setRequired(false)
				mini.get("EmpCertCode").setValue("");
			}
		}
		
		function changeEmployWay(e) {
			var id = e.selected.id;
			if (id == "UnitJudge") {
				mini.get("EmpCertCode").setAllowInput(false);
				mini.get("EmpCertCode").setRequired(false)
				mini.get("EmpCertCode").setValue("");
			} else if(id == "External") {
				mini.get("EmpCertCode").setRequired(true)
				mini.get("EmpCertCode").setAllowInput(true);
			}
		}
		
	</script>
</head>
<body class="dialog-column">
	<form id="form2">
		<input class="mini-hidden" id="MemberId" name="MemberId" value="${MemberId}" />
		<div class="container-fluid">
			<div class="row">
				<div class="col-xs-12">
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">用户名：</span>
						<input class="mini-textbox" id="UserName" name="UserName" readonly value="${UserName}" style="width:50%;" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">姓名：</span>
						<input class="mini-textbox" id="RealName" name="RealName" value="${RealName}" style="width:50%;" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">手机号：</span>
						<input class="mini-textbox" id="Mobile" name="Mobile" value="${Mobile}" style="width:50%;" readonly required="true"/>
					</div>
					<div class="input-group">
						<span class="input-group-addon">类型：</span>
						<input class="mini-combobox" id="EmployWay" value="${EmployWay}" onValuechanged="changeEmployWay" data='[{id:"UnitJudge",text:"本单位评审员"},{id:"External",text:"外聘评审专家"}]' required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">聘请证书编号：</span>
						<input class="mini-textbox" id="EmpCertCode" name="EmpCertCode" value="${EmpCertCode}" style="width:50%;" />
					</div>
					<div class="input-group" style="margin-top:8px;">
						<span class="input-group-addon">评审领域</span>
						<input id="ReviewField" class="mini-treeselect" name="ReviewField" method="Trade.tree" textField="Name" style="width:200px" resultAsTree="false" idField="ID" parentField="ParentId" value="${ReviewField}" valueField="ID"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">性别：</span>
						<input class="mini-combobox" id="Gender" value="${Gender}" data=<e:option code="Gender"/> required="true"/>
						<span class="input-group-addon">民族：</span>
						<input class="mini-combobox" id="Nation" value="${Nation}" data=<e:option code="EthnicityCode"/>/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">身份证号：</span>
						<input class="mini-textbox" id="CertNumber" name="CertNumber" value="${CertNumber}" vtype="IDCardNo" style="width:50%;" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">评审单位名称：</span>
						<input class="mini-textbox" id="EvaluationCompany" name="EvaluationCompany" value="${EvaluationCompany}" style="width:50%;"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">工作单位名称：</span>
						<input class="mini-textbox" id="JobCompany" name="JobCompany" value="${JobCompany}" style="width:50%;" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">所属地区：</span>
						<input class="mini-combobox" id="MProvince" onvaluechanged="onProvinceChanged" textField="name" valueField="code"  required="true"/>
						<input class="mini-combobox" id="MCity" onvaluechanged="onCityChanged"  textField="name" valueField="code" required="true"/>
						<input class="mini-combobox" id="MCounty" textField="name" valueField="code" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">详细地址：</span>
						<input class="mini-textbox" id="MAddress" name="MAddress" value="${MAddress}" style="width:50%;"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">邮政编码：</span>
						<input class="mini-textbox" id="ZipCode" name="ZipCode" value="${ZipCode}" style="width:50%;"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">电子邮箱：</span>
						<input class="mini-textbox" id="Email" name="Email" value="${Email}" style="width:50%;"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">职务：</span>
						<input class="mini-textbox" id="JobType" name="JobType" value="${JobType}" style="width:65%;"/>
						<span class="input-group-addon">职称：</span>
						<input class="mini-textbox" id="JobCall" name="JobCall" value="${JobCall}" style="width:65%;" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">最高学历：</span>
						<input class="mini-combobox" id="HighestEducation" value="${HighestEducation}" data=<e:option code="EduLevel"/> />
						<span class="input-group-addon">最高学位：</span>
						<input class="mini-combobox" id="HighestDegree" value="${HighestDegree}" data=<e:option code="DegreeLevel"/>/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">最高学位毕业院校：</span>
						<input class="mini-textbox" id="HighestSchool" name="HighestSchool" value="${HighestSchool}" style="width:50%;"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">最高学位专业：</span>
						<input class="mini-textbox" id="HighestMajor" name="HighestMajor" value="${HighestMajor}" style="width:50%;"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">现从事专业：</span>
						<input class="mini-textbox" id="CurrentMajor" name="CurrentMajor" value="${CurrentMajor}" style="width:50%;" required="true"/>
						<span class="input-group-addon">年限：</span>
						<input class="mini-textbox" id="MajorYear" name="MajorYear" value="${MajorYear}" style="width:50%;" vtype="float" required="true"/>
					</div>
					<div class="input-group" style="width:100%;">
						<span class="input-group-addon">工作简历及主要成就：</span>
						<textarea class="mini-textarea" style="width:100%;" id="JobResume" name="JobResume">${JobResume}</textarea>
					</div>
				</div>
			</div>
		</div>
	</form>
</body>
</ef:init>
</html>